Automatically set detached state as needed.#925
Merged
Conversation
dam9000
reviewed
May 10, 2024
Contributor
Author
|
Updated as requested, works on my machine :) |
dam9000
reviewed
May 10, 2024
| delve = { | ||
| -- On Windows delve must be run attached or it crashes. | ||
| -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring | ||
| detached = not vim.fn.has 'win32', |
Contributor
There was a problem hiding this comment.
Hmm I think this will always be false
vim.fn.has will return 0 or 1, and in lua not 0 and not 1 will both be false
so I think this needs to be:
detached = vim.fn.has 'win32' == 0,
can you please test that?
Contributor
Author
There was a problem hiding this comment.
Oh right, Lua does that funny thing with numbers and boolean ops. My bad, will fix.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Here's a fix to automatically set the detached state for delve based on the OS. Gives a better first-time experience when delve doesn't crash :)